<?php

class Custom_Search_Lucene_Document extends Zend_Search_Lucene_Document {
	
	const DOCREF = 'docRef';
	const CLASS_NAME = 'class';
	const KEY = 'key';
	const CONTENT = 'content';
	const DESCRIPTION = 'description';
	const DATE = 'date';
	const CREATED = 'created';
	
	public function __construct($class, $id, $title, $description, $date, $created) {
		$this->addField(Zend_Search_Lucene_Field::Text(self::DOCREF, $class.':'.$id, 'UTF-8'));
		$this->addField(Zend_Search_Lucene_Field::Text(self::CLASS_NAME, $class, 'UTF-8'));
		$this->addField(Zend_Search_Lucene_Field::Text(self::KEY, $id, 'UTF-8'));
		$this->addField(Zend_Search_Lucene_Field::Text(self::CONTENT, $title, 'UTF-8'));
		$this->addField(Zend_Search_Lucene_Field::Text(self::DESCRIPTION, $description, 'UTF-8'));
		$this->addField(Zend_Search_Lucene_Field::Text(self::DATE, $date, 'UTF-8'));
		$this->addField(Zend_Search_Lucene_Field::Text(self::CREATED, $created, 'UTF-8'));
	}
}
?>